﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Xml.Linq;
using HigLabo.Net;
using System.Threading.Tasks;

namespace HigLabo.Net.Twitter
{
    /// <summary>
    /// 
    /// </summary>
    public partial class TwitterClient
    {
        #region #Accounts
        public Task<AccountSettings> GetAccountSettingsAsync()
        {
            return AsyncCall<AccountSettings>(this.GetAccountSettings);
        }

        public Task<User> GetAccountVerifyCredentialsAsync(Boolean includeEntities, Boolean skipStatus)
        {
            var cm = new GetAccountVerifyCredentialsCommand();
            cm.IncludeEntities = includeEntities;
            cm.SkipStatus = skipStatus;
            return this.GetAccountVerifyCredentialsAsync(cm);
        }
        
        public Task<User> GetAccountVerifyCredentialsAsync(GetAccountVerifyCredentialsCommand command)
        {
            return AsyncCall<GetAccountVerifyCredentialsCommand, User>(this.GetAccountVerifyCredentials, command);
        }
      
        public Task<AccountSettings> UpdateAccountSettingsAsync(UpdateAccountSettingsCommand command)
        {
            return AsyncCall<UpdateAccountSettingsCommand, AccountSettings>(this.UpdateAccountSettings, command);
        }
        
        public Task<User> UpdateDeliveryDeviceAsync(String device, Boolean includeEntities)
        {
            var cm = new UpdateDeliveryDeviceCommand();
            cm.Device = device;
            cm.IncludeEntities = includeEntities;
            return this.UpdateDeliveryDeviceAsync(cm);
        }
        
        public Task<User> UpdateDeliveryDeviceAsync(UpdateDeliveryDeviceCommand command)
        {
            return AsyncCall<UpdateDeliveryDeviceCommand, User>(this.UpdateDeliveryDevice, command);
        }
        
        public Task<User> UpdateProfileAsync(UpdateProfileCommand command)
        {
            return AsyncCall<UpdateProfileCommand, User>(this.UpdateProfile, command);
        }
        
        public Task<User> UpdateProfileBackgroundImageAsync()
        {
            return AsyncCall<User>(this.UpdateProfileBackgroundImage);
        }
        
        public Task<User> UpdateProfileBackgroundImageAsync(UpdateProfileBackgroundImageCommand command)
        {
            return AsyncCall<UpdateProfileBackgroundImageCommand, User>(this.UpdateProfileBackgroundImage, command);
        }
        
        public Task<User> UpdateProfileBackgroundColorsAsync()
        {
            return AsyncCall<User>(this.UpdateProfileBackgroundColors);
        }
        
        public Task<User> UpdateProfileBackgroundColorsAsync(UpdateProfileColorsCommand command)
        {
            return AsyncCall<UpdateProfileColorsCommand, User>(this.UpdateProfileBackgroundColors, command);
        }
        
        public Task<User> UpdateProfileImageAsync()
        {
            return AsyncCall<User>(this.UpdateProfileImage);
        }

        public Task<User> UpdateProfileImageAsync(UpdateProfileImageCommand command)
        {
            return AsyncCall<UpdateProfileImageCommand, User>(this.UpdateProfileImage, command);
        }
        
        public Task<User> RemoveProfileBannerAsync()
        {
            return AsyncCall<User>(this.RemoveProfileBanner);
        }
   
        public Task<User> UpdateProfileBannerAsync(UpdateProfileBannerCommand command)
        {
            return AsyncCall<UpdateProfileBannerCommand, User>(this.UpdateProfileBanner, command);
        }
        #endregion

        #region #Blocks
        public Task<FriendsUser> GetBlocksListAsync(GetBlocksListCommand command)
        {
            return AsyncCall<GetBlocksListCommand, FriendsUser>(this.GetBlocksList, command);
        }
       
        public Task<Friends> GetBlocksIdsAsync(GetBlocksIdsCommand command)
        {
            return AsyncCall<GetBlocksIdsCommand, Friends>(this.GetBlocksIds, command);
        }
      
        public Task<User> CreateBlocksAsync(Int64 userID)
        {
            return AsyncCall<Int64, User>(this.CreateBlocks, userID);
        }
      
        public Task<User> CreateBlocksAsync(String screenName)
        {
            return AsyncCall<String, User>(this.CreateBlocks, screenName);
        }
     
        public Task<User> CreateBlocksAsync(CreateBlocksCommand command)
        {
            return AsyncCall<CreateBlocksCommand, User>(this.CreateBlocks, command);
        }
    
        public Task<User> DestroyBlocksAsync(Int64 userID)
        {
            return AsyncCall<Int64, User>(this.DestroyBlocks, userID);
        }
    
        public Task<User> DestroyBlocksAsync(String screenName)
        {
            return AsyncCall<String, User>(this.DestroyBlocks, screenName);
        }
   
        public Task<User> DestroyBlocksAsync(DestroyBlocksCommand command)
        {
            return AsyncCall<DestroyBlocksCommand, User>(this.DestroyBlocks, command);
        }
        #endregion

        #region #DirectMessage
        public Task<DirectMessageCollection> GetDirectMessageListAsync()
        {
            return AsyncCall<DirectMessageCollection>(this.GetDirectMessageList);
        }
        
        public Task<DirectMessageCollection> GetDirectMessageListAsync(GetDirectMessageListCommand command)
        {
            return AsyncCall<GetDirectMessageListCommand, DirectMessageCollection>(this.GetDirectMessageList, command);
        }
        
        public Task<DirectMessageCollection> GetDirectMessageListSentAsync()
        {
            return AsyncCall<DirectMessageCollection>(this.GetDirectMessageListSent);
        }
        
        public Task<DirectMessageCollection> GetDirectMessageListSentAsync(GetDirectMessageListSentCommand command)
        {
            return AsyncCall<GetDirectMessageListSentCommand, DirectMessageCollection>(this.GetDirectMessageListSent, command);
        }
        
        public Task<DirectMessage> DestroyDirectMessageAsync(Int64 id)
        {
            return AsyncCall<Int64, DirectMessage>(this.DestroyDirectMessage, id);
        }
        
        public Task<DirectMessage> DestroyDirectMessageAsync(DestroyDirectMessageCommand command, Action<DirectMessage> callback)
        {
            return AsyncCall<DestroyDirectMessageCommand, DirectMessage>(this.DestroyDirectMessage, command);
        }
        
        public Task<DirectMessage> NewDirectMessageAsync(Int64 userID, String text)
        {
            var cm = new NewDirectMessageCommand();
            cm.UserID = userID;
            cm.Text = text;
            return this.NewDirectMessageAsync(cm);
        }
        
        public Task<DirectMessage> NewDirectMessageAsync(NewDirectMessageCommand command)
        {
            return AsyncCall<NewDirectMessageCommand, DirectMessage>(this.NewDirectMessage, command);
        }
        
        public Task<DirectMessageCollection> GetDirectMessagesByIDAsync(Int64 id)
        {
            return AsyncCall<Int64, DirectMessageCollection>(this.GetDirectMessagesByID, id);
        }
        
        public Task<DirectMessageCollection> GetDirectMessagesByIDAsync(GetDirectMessageCommand command)
        {
            return AsyncCall<GetDirectMessageCommand, DirectMessageCollection>(this.GetDirectMessagesByID, command);
        }
        #endregion

        #region #Favorites
        public Task<StatusCollection> GetFavoritesAsync(Int64 userid)
        {
            return AsyncCall<Int64, StatusCollection>(this.GetFavorites, userid);
        }
        
        public Task<StatusCollection> GetFavoritesAsync(String screenName)
        {
            return AsyncCall<String, StatusCollection>(this.GetFavorites, screenName);
        }
        
        public Task<StatusCollection> GetFavoritesAsync(GetFavoritesCommand command, Action<StatusCollection> callback)
        {
            return AsyncCall<GetFavoritesCommand, StatusCollection>(this.GetFavorites, command);
        }
        
        public Task<Status> CreateFavoritesAsync(Int64 id, Boolean includeEntities, Action<Status> callback)
        {
            var cm = new CreateFavoritesCommand();
            cm.ID = id;
            cm.IncludeEntities = includeEntities;
            return this.CreateFavoritesAsync(cm);
        }
        
        public Task<Status> CreateFavoritesAsync(CreateFavoritesCommand command)
        {
            return AsyncCall<CreateFavoritesCommand, Status>(this.CreateFavorites, command);
        }
        
        public Task<Status> DestroyFavoritesAsync(Int64 id, Boolean includeEntities)
        {
            var cm = new DestroyFavoritesCommand();
            cm.ID = id;
            cm.IncludeEntities = includeEntities;
            return this.DestroyFavoritesAsync(cm);
        }
        
        public Task<Status> DestroyFavoritesAsync(DestroyFavoritesCommand command)
        {
            return AsyncCall<DestroyFavoritesCommand, Status>(this.DestroyFavorites, command);
        }
        #endregion

        #region #Friend
        public Task<Friends> GetFollowersAsync(Int64 userID)
        {
            return AsyncCall<Int64, Friends>(this.GetFollowers, userID);
        }
        
        public Task<Friends> GetFollowersAsync(GetFriendsCommand command)
        {
            return AsyncCall<GetFriendsCommand, Friends>(this.GetFollowers, command);
        }
        
        public Task<Friends> GetFriendsAsync(Int64 userID, Action<Friends> callback)
        {
            return AsyncCall<Int64, Friends>(this.GetFriends, userID);
        }
        
        public Task<Friends> GetFriendsAsync(GetFriendsCommand command)
        {
            return AsyncCall<GetFriendsCommand, Friends>(this.GetFriends, command);
        }
        
        public Task<Friends> GetIncomingFriendsAsync()
        {
            return AsyncCall<Friends>(this.GetIncomingFriends);
        }
        
        public Task<Friends> GetIncomingFriendsAsync(GetPendingFollowFriendsCommand command)
        {
            return AsyncCall<GetPendingFollowFriendsCommand, Friends>(this.GetIncomingFriends, command);
        }
        
        public Task<Friends> GetOutgoingFriendsAsync()
        {
            return AsyncCall<Friends>(this.GetOutgoingFriends);
        }
        
        public Task<Friends> GetOutgoingFriendsAsync(GetPendingFollowFriendsCommand command, Action<Friends> callback)
        {
            return AsyncCall<GetPendingFollowFriendsCommand, Friends>(this.GetOutgoingFriends, command);
        }
        
        public Task<Relationship> ShowFriendshipsAsync(Int64 sourceID, Int64 targetID)
        {
            var cm = new ShowFriendshipsCommand();
            cm.SourceID = sourceID;
            cm.TargetID = targetID;
            return ShowFriendshipsAsync(cm);
        }
        
        public Task<Relationship> ShowFriendshipsAsync(String sourceScreenName, String targetScreenName)
        {
            var cm = new ShowFriendshipsCommand();
            cm.SourceScreenName = sourceScreenName;
            cm.TargetScreenName = targetScreenName;
            return ShowFriendshipsAsync(cm);       
        }
        
        public Task<Relationship> ShowFriendshipsAsync(ShowFriendshipsCommand command)
        {
            return AsyncCall<ShowFriendshipsCommand, Relationship>(this.ShowFriendships, command);
        }
        
        public Task<User> DestroyFriendshipAsync(Int64 userID)
        {
            var cm = new DestroyFriendshipCommand();
            cm.UserID = userID;
            return DestroyFriendshipAsync(cm);
        }
        
        public Task<User> DestroyFriendshipAsync(String screenName)
        {
            var cm = new DestroyFriendshipCommand();
            cm.ScreenName = screenName;
            return DestroyFriendshipAsync(cm);
        }
        
        public Task<User> DestroyFriendshipAsync(DestroyFriendshipCommand command)
        {
            return AsyncCall<DestroyFriendshipCommand, User>(this.DestroyFriendship, command);
        }
        
        public Task<User> CreateFriendshipAsync(Int64 userID)
        {
            var cm = new CreateFriendshipCommand();
            cm.UserID = userID;
            return CreateFriendshipAsync(cm);
        }
        
        public Task<User> CreateFriendshipAsync(String screenName)
        {
            var cm = new CreateFriendshipCommand();
            cm.ScreenName = screenName;
            return CreateFriendshipAsync(cm);
        }
        
        public Task<User> CreateFriendshipAsync(CreateFriendshipCommand command)
        {
            return AsyncCall<CreateFriendshipCommand, User>(this.CreateFriendship, command);
        }
        
        public Task<Relationship> UpdateFriendshipAsync(UpdateFriendshipCommand command)
        {
            return AsyncCall<UpdateFriendshipCommand, Relationship>(this.UpdateFriendship, command);
        }
        
        public Task<IEnumerable<Int64>> GetNoRetweetIDsAsync()
        {
            return AsyncCall<IEnumerable<Int64>>(this.GetNoRetweetIDs);
        }
        
        public Task<IEnumerable<Int64>> GetNoRetweetIDsAsync(GetNoRetweetIDsCommand command)
        {
            return AsyncCall<GetNoRetweetIDsCommand, IEnumerable<Int64>>(this.GetNoRetweetIDs, command);
        }
        
        public Task<FriendshipCollection> LookupFriendshipsAsync(Int64[] uidValues, Action<FriendshipCollection> callback)
        {
            return AsyncCall<Int64[], FriendshipCollection>(this.LookupFriendships, uidValues);
        }
        
        public Task<FriendshipCollection> LookupFriendshipsAsync(String[] nameValues)
        {
            return AsyncCall<String[], FriendshipCollection>(this.LookupFriendships, nameValues);
        }
        
        public Task<FriendshipCollection> LookupFriendshipsAsync(LookupFriendshipsCommand command)
        {
            return AsyncCall<LookupFriendshipsCommand, FriendshipCollection>(this.LookupFriendships, command);
        }
        
        public Task<FriendsUser> GetFriendsListAsync()
        {
            return AsyncCall<FriendsUser>(this.GetFriendsList);
        }
        
        public Task<FriendsUser> GetFriendsListAsync(GetFriendsUserCommand command)
        {
            return AsyncCall<GetFriendsUserCommand, FriendsUser>(this.GetFriendsList, command);
        }
        
        public Task<FriendsUser> GetFollowerListAsync()
        {
            return AsyncCall<FriendsUser>(this.GetFollowerList);
        }
        
        public Task<FriendsUser> GetFollowerListAsync(GetFriendsUserCommand command)
        {
            return AsyncCall<GetFriendsUserCommand, FriendsUser>(this.GetFollowerList, command);
        }
        #endregion

        #region #Geo
        public Task<Places> GetGeoSimilarPlacesAsync(String placeName, Double latitude, Double longitude)
        {
            GetGeoSimilarPlacesCommand command = new GetGeoSimilarPlacesCommand() { Name = placeName, Latitude = latitude, Longitude = longitude };
            return this.GetGeoSimilarPlacesAsync(command);
        }
        
        public Task<Places> GetGeoSimilarPlacesAsync(GetGeoSimilarPlacesCommand command)
        {
            return AsyncCall<GetGeoSimilarPlacesCommand, Places>(this.GetGeoSimilarPlaces, command);
        }
        
        public Task<Places> GetGeoSearchAsync(GetGeoSearchCommand command)
        {
            return AsyncCall<GetGeoSearchCommand, Places>(this.GetGeoSearch, command);
        }
        
        public Task<Places> GetGeoReverseGeoCodeAsync(Double latitude, Double longitude)
        {
            GetReverseGeoCodeCommand command = new GetReverseGeoCodeCommand() { Latitude = latitude, Longitude = longitude };
            return this.GetGeoReverseGeoCodeAsync(command);
        }
        
        public Task<Places> GetGeoReverseGeoCodeAsync(GetReverseGeoCodeCommand command)
        {
            return AsyncCall<GetReverseGeoCodeCommand, Places>(this.GetGeoReverseGeoCode, command);
        }
        
        public Task<Place> GetGeoPlaceAsync(String placeID)
        {
            GetGeoPlaceCommand command = new GetGeoPlaceCommand() { PlaceID = placeID };
            return this.GetGeoPlaceAsync(command);
        }
        
        public Task<Place> GetGeoPlaceAsync(GetGeoPlaceCommand command)
        {
            return AsyncCall<GetGeoPlaceCommand, Place>(this.GetGeoPlace, command);
        }
        
        public Task<Place> CreateGeoPlaceAsync(String name, String parentPlaceID, String token, Double latitude, Double longitude)
        {
            PostGeoPlaceCommand command = new PostGeoPlaceCommand()
            {
                Name = name,
                ContainedWithin = parentPlaceID,
                Token = token,
                Latitude = latitude,
                Longitude = longitude
            };
            return this.CreateGeoPlaceAsync(command);
        }
        
        public Task<Place> CreateGeoPlaceAsync(PostGeoPlaceCommand command)
        {
            return AsyncCall<PostGeoPlaceCommand, Place>(this.CreateGeoPlace, command);
        }
        #endregion

        #region #Help
        public Task<RateLimits> GetApplicationRateLimitStatusAsync()
        {
            return AsyncCall<RateLimits>(this.GetApplicationRateLimitStatus);
        }
        
        public Task<RateLimits> GetApplicationRateLimitStatusAsync(GetAppRateLimitStatusCommand command)
        {
            return AsyncCall<GetAppRateLimitStatusCommand, RateLimits>(this.GetApplicationRateLimitStatus, command);
        }
        
        public Task<String> GetHelpTosAsync()
        {
            return AsyncCall<String>(this.GetHelpTos);
        }
        
        public Task<String> GetHelpPrivacyAsync()
        {
            return AsyncCall<String>(this.GetHelpPrivacy);
        }
        
        public Task<LanguageCollection> GetSupportLanguagesAsync()
        {
            return AsyncCall<LanguageCollection>(this.GetSupportLanguages);
        }
        
        public Task<Configuration> GetConfigurationAsync()
        {
            return AsyncCall<Configuration>(this.GetConfiguration);
        }
        #endregion

        #region #Lists
        public Task<ListCollection> GetAllListsAsync()
        {
            return AsyncCall<ListCollection>(this.GetAllLists);
        }
        
        public Task<ListCollection> GetAllListsAsync(GetAllListsCommand command)
        {
            return AsyncCall<GetAllListsCommand, ListCollection>(this.GetAllLists, command);
        }
        
        public Task<StatusCollection> GetListsStatusesAsync(GetListsStatusesCommand command)
        {
            return AsyncCall<GetListsStatusesCommand, StatusCollection>(this.GetListsStatuses, command);
        }
        
        public Task<User> DestroyListMembersAsync(DestroyListsMembersCommand command)
        {
            return AsyncCall<DestroyListsMembersCommand, User>(this.DestroyListMembers, command);
        }
        
        public Task<Memberships> GetListsMembershipsAsync(GetListsMembershipsCommand command)
        {
            return AsyncCall<GetListsMembershipsCommand , Memberships>(this.GetListsMemberships, command);
        }
        
        public Task<FriendsUser> GetListsSubscribersAsync()
        {
            return AsyncCall<FriendsUser>(this.GetListsSubscribers);
        }
        
        public Task<FriendsUser> GetListsSubscribersAsync(GetListsSubscribersCommand command)
        {
            return AsyncCall<GetListsSubscribersCommand , FriendsUser>(this.GetListsSubscribers, command);
        }
        
        public Task<List> CreateListsSubscribersAsync(CreateListsSubscribersCommand command)
        {
            return AsyncCall<CreateListsSubscribersCommand, List>(this.CreateListsSubscribers, command);
        }
        
        public Task<User> ShowListsSubscribersAsync(ShowListsSubscribers command)
        {
            return AsyncCall<ShowListsSubscribers, User>(this.ShowListsSubscribers, command);
        }
        
        public Task<User> DestroyListsSubscribersAsync(DestroyListsSubscribersCommand command)
        {
            return AsyncCall<DestroyListsSubscribersCommand, User>(this.DestroyListsSubscribers, command);
        }
        
        public Task<FriendshipCollection> CreateAllListsMembersAsync(Int64[] values)
        {
            return AsyncCall<Int64[], FriendshipCollection>(this.CreateAllListsMembers, values);
        }
        
        public Task<FriendshipCollection> CreateAllListsMembersAsync(String[] values)
        {
            return AsyncCall<String[], FriendshipCollection>(this.CreateAllListsMembers, values);
        }
        
        public Task<FriendshipCollection> CreateAllListsMembersAsync(CreateAllListsMembersCommand command)
        {
            return AsyncCall<CreateAllListsMembersCommand, FriendshipCollection>(this.CreateAllListsMembers, command);
        }
        
        public Task<User> ShowListsMembersAsync(ShowListsMembersCommand command)
        {
            return AsyncCall<ShowListsMembersCommand, User>(this.ShowListsMembers, command);
        }
        
        public Task<FriendsUser> GetListsMembersAsync(GetListsMembersCommand command)
        {
            return AsyncCall<GetListsMembersCommand, FriendsUser>(this.GetListsMembers, command);
        }
        
        public Task<User> CreateListsMembersAsync(CreateListsMembersCommand command)
        {
            return AsyncCall<CreateListsMembersCommand, User>(this.CreateListsMembers, command);
        }
        
        public Task<List> DestroyListsAsync(DestroyListsCommnad command)
        {
            return AsyncCall<DestroyListsCommnad, List>(this.DestroyLists, command);
        }
        
        public Task<List> UpdateListsAsync(UpdateListsCommand command)
        {
            return AsyncCall<UpdateListsCommand, List>(this.UpdateLists, command);
        }
        
        public Task<List> CreateListsAsync(CreateListsCommnad command)
        {
            return AsyncCall<CreateListsCommnad, List>(this.CreateLists, command);
        }
        
        public Task<Memberships> GetListsAsync(GetListsCommand command)
        {
            return AsyncCall<GetListsCommand, Memberships>(this.GetLists, command);
        }
        
        public Task<List> ShowListsAsync(ShowListsCommnad command)
        {
            return AsyncCall<ShowListsCommnad, List>(this.ShowLists, command);
        }
        
        public Task<Memberships> GetListsSubscriptionsAsync(GetListsSubscriptionsCommand command)
        {
            return AsyncCall<GetListsSubscriptionsCommand, Memberships>(this.GetListsSubscriptions, command);
        }
        
        public Task<FriendshipCollection> DestroyAllListsMembersAsync(Int64[] values)
        {
            return AsyncCall<Int64[], FriendshipCollection>(this.DestroyAllListsMembers, values);
        }
        
        public Task<FriendshipCollection> DestroyAllListsMembersAsync(String[] values)
        {
            return AsyncCall<String[], FriendshipCollection>(this.DestroyAllListsMembers, values);
        }
        
        public Task<FriendshipCollection> DestroyAllListsMembersAsync(DestroyAllListsMembersCommand command)
        {
            return AsyncCall<DestroyAllListsMembersCommand, FriendshipCollection>(this.DestroyAllListsMembers, command);
        }
        #endregion

        #region #LocalTrends
        
        public Task<TrendsCollection> GetTrendsPlaceAsync(Int32 woeID)
        {
            return AsyncCall<Int32, TrendsCollection>(this.GetTrendsPlace, woeID);
        }
        
        public Task<TrendsCollection> GetTrendsPlaceAsync(GetTrendsPlaceCommand command)
        {
            return AsyncCall<GetTrendsPlaceCommand, TrendsCollection>(this.GetTrendsPlace, command);
        }
        
        public Task<TrendLocationCollection> GetTrendsClosestAsync(Double latitude, Double longitude)
        {
            GetTrendsClosestCommand command = new GetTrendsClosestCommand() { Latitude = latitude, Longitude = longitude };
            return this.GetTrendsClosestAsync(command);
        }
        
        public Task<TrendLocationCollection> GetTrendsClosestAsync(GetTrendsClosestCommand command)
        {
            return AsyncCall<GetTrendsClosestCommand, TrendLocationCollection>(this.GetTrendsClosest, command);
        }
        
        public Task<TrendLocationCollection> GetTrendsAvailableAsync()
        {
            return AsyncCall<TrendLocationCollection>(this.GetTrendsAvailable);
        }
        #endregion

        #region #SavedSearches
        
        public Task<SavedSearchCollection> GetSavedSearchesListAsync()
        {
            return AsyncCall<SavedSearchCollection>(this.GetSavedSearchesList);
        }
        
        public Task<SavedSearch> GetSavedSearchesByIdAsync(Int64 id)
        {
            return AsyncCall<Int64, SavedSearch>(this.GetSavedSearchesById, id);
        }
        
        public Task<SavedSearch> CreateSavedSearchesAsync(String query)
        {
            return AsyncCall<String, SavedSearch>(this.CreateSavedSearches, query);
        }
        
        public Task<SavedSearch> CreateSavedSearchesAsync(CreateSavedSearchesCommand command)
        {
            return AsyncCall<CreateSavedSearchesCommand, SavedSearch>(this.CreateSavedSearches, command);
        }
        
        public Task<SavedSearch> DestroySavedSearchesAsync(Int64 id)
        {
            return AsyncCall<Int64, SavedSearch>(this.DestroySavedSearches, id);
        }
        #endregion

        #region #Search
        public Task<SearchResult> SearchAsync(String query)
        {
            return this.SearchAsync(new SearchCommand() { Query = query });
        }
        
        public Task<SearchResult> SearchAsync(SearchCommand command)
        {
            return AsyncCall<SearchCommand, SearchResult>(this.Search, command);
        }
        #endregion

        #region #Suggestions
        
        public Task<SuggestionCollection> GetSuggestionsAsync(String language)
        {
            return AsyncCall<String, SuggestionCollection>(this.GetSuggestions, language);
        }
        
        public Task<SuggestionCollection> GetSuggestionsAsync(GetSuggestionsCommand command)
        {
            return AsyncCall<GetSuggestionsCommand, SuggestionCollection>(this.GetSuggestions, command);
        }
        
        public Task<Suggestion> GetSuggetstionsSlugAsync(String slug, String language)
        {
            var cm = new GetSuggestionsSlugCommand();
            cm.Slug = slug;
            cm.Lang = language;
            return this.GetSuggetstionsSlugAsync(cm);
        }
        
        public Task<Suggestion> GetSuggetstionsSlugAsync(GetSuggestionsSlugCommand command)
        {
            return AsyncCall<GetSuggestionsSlugCommand, Suggestion>(this.GetSuggetstionsSlug, command);
        }
        
        public Task<UserCollection> GetSuggestionUsersAsync(String slug)
        {
            var cm = new GetSuggestionUsersCommand() { Slug = slug };
            return this.GetSuggestionUsersAsync(cm);
        }
        
        public Task<UserCollection> GetSuggestionUsersAsync(GetSuggestionUsersCommand command)
        {
            return AsyncCall<GetSuggestionUsersCommand, UserCollection>(this.GetSuggestionUsers, command);
        }
        #endregion

        #region #Timeline
        public Task<StatusCollection> GetMentionsTimelineAsync()
        {
            return AsyncCall<StatusCollection>(this.GetMentionsTimeline);
        }
        
        public Task<StatusCollection> GetMentionsTimelineAsync(GetMentionsTimelineCommand command)
        {
            return AsyncCall<GetMentionsTimelineCommand, StatusCollection>(this.GetMentionsTimeline, command);
        }
        
        public Task<StatusCollection> GetUserTimelineAsync()
        {
            return AsyncCall<StatusCollection>(this.GetUserTimeline);
        }
        
        public Task<StatusCollection> GetUserTimelineAsync(GetUserTimelineCommand command)
        {
            return AsyncCall<GetUserTimelineCommand, StatusCollection>(this.GetUserTimeline, command);
        }
        
        public Task<StatusCollection> GetHomeTimelineAsync()
        {
            return AsyncCall<StatusCollection>(this.GetHomeTimeline);
        }
        
        public Task<StatusCollection> GetHomeTimelineAsync(GetHomeTimelineCommand command)
        {
            return AsyncCall<GetHomeTimelineCommand, StatusCollection>(this.GetHomeTimeline, command);
        }
        
        public Task<StatusCollection> GetRetweetsOfMeTimelineAsync()
        {
            return AsyncCall<StatusCollection>(this.GetRetweetsOfMeTimeline);
        }
        
        public Task<StatusCollection> GetRetweetsOfMeTimelineAsync(GetRetweetsOfMeTimelineCommand command)
        {
            return AsyncCall<GetRetweetsOfMeTimelineCommand, StatusCollection>(this.GetRetweetsOfMeTimeline, command);
        }
        #endregion

        #region #Tweet
        public Task<StatusCollection> GetRetweetsAsync(Int64 id)
        {
            return this.GetRetweetsAsync(new GetRetweetsCommand(id));
        }
        
        public Task<StatusCollection> GetRetweetsAsync(GetRetweetsCommand command)
        {
            return AsyncCall<GetRetweetsCommand, StatusCollection>(this.GetRetweets, command);
        }
        
        public Task<Status> GetStatusAsync(Int64 id)
        {
            return this.GetStatusAsync(new GetRetweetCommand(id));
        }
        
        public Task<Status> GetStatusAsync(GetRetweetCommand command)
        {
            return AsyncCall<GetRetweetCommand, Status>(this.GetStatus, command);
        }
        
        public Task<Status> DestroyStatusAsync(Int64 id)
        {
            return this.DestroyStatusAsync(new RetweetCommand(id));
        }
        
        public Task<Status> DestroyStatusAsync(RetweetCommand command)
        {
            return AsyncCall<RetweetCommand, Status>(this.DestroyStatus, command);
        }
        
        public Task<Status> RetweetStatusAsync(Int64 id, Action<Status> callback)
        {
            return AsyncCall<Int64, Status>(this.RetweetStatus, id);
        }
        
        public Task<Status> RetweetStatusAsync(RetweetCommand command)
        {
            return AsyncCall<RetweetCommand, Status>(this.RetweetStatus, command);
        }
        
        public Task<Status> UpdateStatusAsync(String tweetText)
        {
            return AsyncCall<String, Status>(this.UpdateStatus, tweetText);
        }
        
        public Task<Status> UpdateStatusAsync(UpdateStatusCommand command)
        {
            return AsyncCall<UpdateStatusCommand, Status>(this.UpdateStatus, command);
        }
        #endregion

        #region #User
        
        public Task<UserCollection> LookupUsersAsync(Int64[] values)
        {
            return AsyncCall<Int64[], UserCollection>(this.LookupUsers, values);
        }
        
        public Task<UserCollection> LookupUsersAsync(String[] values)
        {
            return AsyncCall<String[], UserCollection>(this.LookupUsers, values);
        }
        
        public Task<UserCollection> LookupUsersAsync(LookupUserCommand command, Action<UserCollection> callback)
        {
            return AsyncCall<LookupUserCommand, UserCollection>(this.LookupUsers, command);
        }
        
        public Task<UserCollection> SearchUsersAsync(String query)
        {
            return AsyncCall<String, UserCollection>(this.SearchUsers, query);
        }
        
        public Task<UserCollection> SearchUsersAsync(SearchUserCommand command)
        {
            return AsyncCall<SearchUserCommand, UserCollection>(this.SearchUsers, command);
        }
        
        public Task<User> ShowUserAsync(Int64 id)
        {
            return AsyncCall<Int64, User>(this.ShowUser, id);
        }
        
        public Task<User> ShowUserAsync(String screenName)
        {
            return AsyncCall<String, User>(this.ShowUser, screenName);
        }
        
        public Task<User> ShowUserAsync(ShowUserCommand command)
        {
            return AsyncCall<ShowUserCommand, User>(this.ShowUser, command);
        }
        
        public Task<UserCollection> GetContributeesAsync(Int64 id)
        {
            return AsyncCall<Int64, UserCollection>(this.GetContributees, id);
        }
        
        public Task<UserCollection> GetContributeesAsync(String screenName)
        {
            return AsyncCall<String, UserCollection>(this.GetContributees, screenName);
        }
        
        public Task<UserCollection> GetContributeesAsync(GetContributeesCommand command)
        {
            return AsyncCall<GetContributeesCommand, UserCollection>(this.GetContributees, command);
        }
        
        public Task<UserCollection> GetContributorsAsync(Int64 id)
        {
            return AsyncCall<Int64, UserCollection>(this.GetContributors, id);
        }
       
        public Task<UserCollection> GetContributorsAsync(String screenName)
        {
            return AsyncCall<String, UserCollection>(this.GetContributors, screenName);
        }
       
        public Task<UserCollection> GetContributorsAsync(GetContributorsCommand command)
        {
            return AsyncCall<GetContributorsCommand, UserCollection>(this.GetContributors, command);
        }
       
        public Task<BannerInfo> GetProfileBannerAsync(Int64 id)
        {
            return AsyncCall<Int64, BannerInfo>(this.GetProfileBanner, id);
        }
       
        public Task<BannerInfo> GetProfileBannerAsync(String screenName)
        {
            return AsyncCall<String, BannerInfo>(this.GetProfileBanner, screenName);
        }
      
        public Task<BannerInfo> GetProfileBannerAsync(GetProfileBannerCommand command)
        {
            return AsyncCall<GetProfileBannerCommand, BannerInfo>(this.GetProfileBanner, command);
        }
        #endregion
    }
}
